//
//  CommentCell.h
//  XPhoto
//
//  Created by baboy on 2019/7/4.
//  Copyright © 2019 baboy. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "Comment.h"
#import "BKTextView.h"

NS_ASSUME_NONNULL_BEGIN

@protocol CommentCellDelegate;

@interface CommentCell : UITableViewCell<BKTextViewDelegate>
@property(nonatomic, strong) IBOutlet UIButton *avatarButton;
@property(nonatomic, strong) IBOutlet BKTextView *contentTextView;
@property(nonatomic, strong) IBOutlet UILabel *timeLabel;
@property(nonatomic, assign) id<CommentCellDelegate> delegate;
@property(nonatomic, strong) Comment *comment;
@property(nonatomic, assign) BOOL hasMore;
@property(nonatomic, strong) IBOutlet UIButton *moreButton;

- (IBAction)clickAvatar:(id)sender;
- (IBAction)clickMoreButton:(id)sender;
- (CGFloat)cellHeightWithComment:(Comment*)comment width:(CGFloat)width;
@end


@protocol CommentCellDelegate <NSObject>

@optional
- (void)commentCellDidClickAvatar:(CommentCell *)commentCell;
- (void)commentCellDidClickNickname:(CommentCell *)commentCell;
- (void)commentCellDidClickContent:(CommentCell *)commentCell;
- (void)commentCellDidClickReply:(CommentCell *)commentCell;
- (void)commentCellDidClickMoreButton:(CommentCell *)commentCell;
@end

NS_ASSUME_NONNULL_END
